package trying;

import java.util.ArrayList;
import java.util.List;

public class ListSub {

    public static void main(String[] args) {
        List sub = List.of(1,2,3,4,5);
        System.out.println(sub.subList(0, sub.indexOf(4) + 1));
        String s = """
                sss
                """;
    }
}
